﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization;

namespace GanFeng.Forest.WebApi.Objects
{
    /// <summary>
    /// MES 配方
    /// </summary>
    public class MesRecipeResult
    {
        /// <summary>
        /// 配方名称。最大长度 12 个 Asccii 字符
        /// </summary>
        [JsonPropertyName("name")]
        public string Name { get; set; } = string.Empty;
        /// <summary>
        /// 设备编码
        /// </summary>
        [JsonPropertyName("device_code")]
        public string DeviceCode { get; set;} = string.Empty;
        /// <summary>
        /// true 表示无此原材料
        /// </summary>
        [JsonPropertyName("material_setting_wrong")]
        public bool MaterialSettingWrong { get; set; }
        /// <summary>
        /// true 表示运行时间设置错误
        /// </summary>
        [JsonPropertyName("elapsed_time_setting_wrong")]
        public bool ElapsedTimeSettingWrong { get; set; }
        /// <summary>
        /// true 表示转速设置错误
        /// </summary>
        [JsonPropertyName("rotate_speed_setting_wrong")]
        public bool RotateSpeedSettingWrong { get; set; }
        /// <summary>
        /// true 表示功能码设置错误
        /// </summary>
        [JsonPropertyName("function_code_setting_wrong")]
        public bool FunctionCodeSettingWrong{get;set;}
        /// <summary>
        /// 配比：0~100
        /// </summary>
        [JsonPropertyName("rate")]
        public double Rate { get; set; }
        /// <summary>
        /// MES 配方明细集
        /// </summary>
        [JsonPropertyName("details")]
        public MesRecipeResultDetail[]? Details { get; set;}
    }
}
